package com.hanlin.backend.config;

import com.baomidou.mybatisplus.extension.plugins.OptimisticLockerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * mybatisplus配置文件
 *
 * @author:hl.yuan
 * @date:2021-01-19
 */
@EnableTransactionManagement
@Configuration
public class MyBaitsPlusConfig {
    /**
     * 修复bug：Parameter 'MP_OPTLOCK_VERSION_ORIGINAL' not found. Available parameters are
     *
     * @return
     */
    @Bean
    public OptimisticLockerInterceptor OptimisticLockerInnerInterceptor() {
        return new OptimisticLockerInterceptor();
    }

}
